<?php

namespace D3hdv\Diablo3Bundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * D3Objet
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="D3hdv\Diablo3Bundle\Entity\D3ObjetRepository")
 */
class D3Objet
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="spe", type="string", length=255)
     */
    private $spe;

    /**
     * @var float
     *
     * @ORM\Column(name="speRatio", type="float")
     */
    private $speRatio;

    /**
     * @ORM\ManyToOne(targetEntity="D3hdv\Diablo3Bundle\Entity\D3ObjetModele")
     * @ORM\JoinColumn(nullable=false)
     */
    private $ObjetModele;

    /**
     * @ORM\ManyToMany(targetEntity="D3hdv\Diablo3Bundle\Entity\D3ObjetCaracValeur", cascade={"persist"})
     */
    private $Caracteristiques;

    /**
     * @var boolean
     *
     * @ORM\Column(name="prise", type="boolean")
     */
    private $prise;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set spe
     *
     * @param string $spe
     * @return D3Objet
     */
    public function setSpe($spe)
    {
        $this->spe = $spe;
    
        return $this;
    }

    /**
     * Get spe
     *
     * @return string 
     */
    public function getSpe()
    {
        return $this->spe;
    }

    /**
     * Set prise
     *
     * @param boolean $prise
     * @return D3Objet
     */
    public function setPrise($prise)
    {
        $this->prise = $prise;
    
        return $this;
    }

    /**
     * Get prise
     *
     * @return boolean 
     */
    public function getPrise()
    {
        return $this->prise;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->Caracteristiques = new \Doctrine\Common\Collections\ArrayCollection();
	$this->prise =false;
    }
    
    /**
     * Set ObjetModele
     *
     * @param \D3hdv\Diablo3Bundle\Entity\D3ObjetModele $objetModele
     * @return D3Objet
     */
    public function setObjetModele(\D3hdv\Diablo3Bundle\Entity\D3ObjetModele $objetModele)
    {
        $this->ObjetModele = $objetModele;
    
        return $this;
    }

    /**
     * Get ObjetModele
     *
     * @return \D3hdv\Diablo3Bundle\Entity\D3ObjetModele 
     */
    public function getObjetModele()
    {
        return $this->ObjetModele;
    }

    /**
     * Add Caracteristiques
     *
     * @param \D3hdv\Diablo3Bundle\Entity\D3ObjetCaracValeur $caracteristiques
     * @return D3Objet
     */
    public function addCaracteristique(\D3hdv\Diablo3Bundle\Entity\D3ObjetCaracValeur $caracteristiques)
    {
        $this->Caracteristiques[] = $caracteristiques;
    
        return $this;
    }

    /**
     * Remove Caracteristiques
     *
     * @param \D3hdv\Diablo3Bundle\Entity\D3ObjetCaracValeur $caracteristiques
     */
    public function removeCaracteristique(\D3hdv\Diablo3Bundle\Entity\D3ObjetCaracValeur $caracteristiques)
    {
        $this->Caracteristiques->removeElement($caracteristiques);
    }

    /**
     * Get Caracteristiques
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getCaracteristiques()
    {
        return $this->Caracteristiques;
    }

    /**
     * Set speRatio
     *
     * @param float $speRatio
     * @return D3Objet
     */
    public function setSpeRatio($speRatio)
    {
        $this->speRatio = $speRatio;
    
        return $this;
    }

    /**
     * Get speRatio
     *
     * @return float 
     */
    public function getSpeRatio()
    {
        return $this->speRatio;
    }
}